import Vue from "vue";

import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import Worker from 'worker-loader!@/worker/worker.js'
const workers = new Worker()
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang zh-CN
import * as Filters from './filters' // global filters
import '@/styles/index.scss' // global css

import App from "./App.vue";
import router from "./router";
import store from "./store";

import '@/icons' // icon
import '@/permission' // permission control
import '@/utils/dialogDrag'
// set ElementUI lang to EN
Vue.use(ElementUI, { size: 'small', locale })

// register global utility filters.
Object.keys(Filters).forEach(key => {
  Vue.filter(key, Filters[key])
})

Vue.config.productionTip = false;

Vue.prototype.$workers = workers

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
}).$mount("#app");
